-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2/4] Supermicro redfish methods #370
Conversation
func (c *Client) PowerStateGet(ctx context.Context) (state string, err error) { | ||
if c.serviceClient == nil || c.serviceClient.redfish == nil { | ||
return "", errors.Wrap(bmclibErrs.ErrLoginFailed, "client not initialized") | ||
} | ||
|
||
return c.serviceClient.redfish.SystemPowerStatus(ctx) | ||
} | ||
|
||
// PowerSet sets the power state of a server | ||
func (c *Client) PowerSet(ctx context.Context, state string) (ok bool, err error) { | ||
if c.serviceClient == nil || c.serviceClient.redfish == nil { | ||
return false, errors.Wrap(bmclibErrs.ErrLoginFailed, "client not initialized") | ||
} | ||
|
||
return c.serviceClient.redfish.PowerSet(ctx, state) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the state
for these methods be a constant with a specific type, something like PowerState
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep thats the plan, although since this will affect all providers and it changes the interface, it needs to be done separately
…thod should be generic
…rSet(), PowerStateGet() methods
…oadedAndInitiate(), FirmwareInstallStatus() methods
[4/4] Redfish dell
[3/4] redfish/GetBiosConfiguration: move tests and fixtures
What does this PR implement/change/remove?
Checklist